package de.dhe.clien.testt;

import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;

import de.dhe.client.AlbumCtrl;
import de.dhe.client.LoginCtrl;
import de.dhe.client.domain.Response;
import de.dhe.client.domain.User;

@SuppressWarnings("deprecation")
public class SimpleHttpPut {


	
	public static void main(String[] args) {
		
 
		HttpClient client = new DefaultHttpClient();
		
		LoginCtrl login = new LoginCtrl(client);
		AlbumCtrl album = new AlbumCtrl(client);
		
		String userName="aline";
	 
		/*
		 * User must be unique
		 */
		
		/**
		 * Email must be unique
		 */
		login.createNewUser(userName,userName+"@bartreff.de","1234");
		
		Response response = login.login(userName+"@bartreff.de","1234");
		User user = response.getUser();
		
		album.listAblum(response.getUid());	
		Response createAblum = album.createAblum(response.getUid(), "bestOF2");
		
		 
		
	}
}